{% extends 'common/base.html' %} {% block header %} {% endblock %} {% block content %}

<script type="text/javascript">
// Load and display the list of file
function load_files(trigger) {
	$.ajax({   
        type: "GET",
        url: "/peakAnalyzer/basespace/",       
        dataType:'text',   
        success: function(data, textStatus){
        		$(trigger).html(data);
		}
	})
}
</script>

<div class="span3">
<li class="nav-header"><a href="#"><i
class="icon-home icon-white"></i> <i class="icon-user"></i>{{ user.Name }}</a>
</li>
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
{% for project in user.project_set.all %}
	<li class="nav-header"><i class="icon-book"></i>{{ project.Name }}</li>
	{% for appresult in project.appresult_set.all %}
		<li><a a class="accordion-toggle" data-toggle="collapse" data-target="#demo{{ appresult.AppResultId }}" href="#" onclick=load_files("#demo{{ appresult.AppResultId }}") ><i class="icon-list"></i>{{ appresult.Name }}</a></li>
		 <div id="demo{{ appresult.AppResultId }}" class="collapse" > Loading...</div>
	{% endfor %}
        <hr>
	{% for sample in project.sample_set.all %}
                <li><a href="#"><i class="icon-plus"></i>{{ sample.Name }}</a></li>
        {% endfor %}
{% endfor %}
            </ul>
          </div><!--/.well -->
        </div><!--/span-->
         
{% endblock %}
